const sharedResourcesBuilder = require('../infra/shared-resources-builder');
if (require.main === module) {
    (async() => {
        try {
            const findEC2InstancesByNameResp = await sharedResourcesBuilder.findEC2InstancesByName("v2ray");
            const instanceId = findEC2InstancesByNameResp[0].InstanceId;
            const publicAddress = findEC2InstancesByNameResp[0].PublicIpAddress;
            console.log(`v2ray instanceId: ${instanceId}, public ip: ${publicAddress}`);
        } catch (error){
            console.error(error);
        }
    })();
}